package com.ccq.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ccq.entity.PsiProduct;
import com.ccq.service.ITestService;
import com.ccq.service.PsiService;

@Controller
public class MainController {
	
	@Autowired
	private ITestService testService;
	
	
	@Autowired
	private PsiService psiService;
	
	@RequestMapping(value="test",method=RequestMethod.GET)
	public String test() {
		
		return "test";
	} 
	
	
	
	@RequestMapping(value="springtest")
	public String springTest() {
		
		return testService.test();
	}
	
	@RequestMapping(value="list")
	@ResponseBody
	public List<PsiProduct> products(){
		return this.psiService.products();
	}
	
	
	

}
